package com.yijushequ.action.utils;

import com.yijushequ.action.BasicAction;
import com.yijushequ.dao.BaseUserDao;
import com.yijushequ.domain.BaseUser;
import com.yijushequ.utils.Constants;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

/**
 * Created by yijushequ
 * User: GGW
 * Date: 12-4-30
 * Time: 下午6:08
 * To change this template use File | Settings | File Templates.
 */
@SuppressWarnings("UnusedDeclaration")
@Controller
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
@Namespace(BasicAction.BASE_NAME_SPACE)
public class ImageProcessAction extends BasicAction{
    private BaseUserDao baseUserDao;
    private BaseUser user;

    private int imgX;
    private int imgY;
    private int imgWidth;
    private int imgHeight;
    private String userPortraitName;


    @Action(value = "userPortraitCrop", results = {@Result(name = SUCCESS, type = Constants.RESULT_NAME_TILES, location = ".userPortraitCrop") })
    public String userPortraitCrop() {
        return SUCCESS;
    }
    @Action(value = "courseLogoProcess", results = {@Result(name = SUCCESS, type = Constants.RESULT_NAME_TILES, location = ".courseLogoProcess") })
    public String courseLogoProcess() {
        return SUCCESS;
    }


    public int getImgX() {
        return imgX;
    }

    public void setImgX(int imgX) {
        this.imgX = imgX;
    }

    public int getImgY() {
        return imgY;
    }

    public void setImgY(int imgY) {
        this.imgY = imgY;
    }

    public int getImgWidth() {
        return imgWidth;
    }

    public void setImgWidth(int imgWidth) {
        this.imgWidth = imgWidth;
    }

    public int getImgHeight() {
        return imgHeight;
    }

    public void setImgHeight(int imgHeight) {
        this.imgHeight = imgHeight;
    }

    public String getUserPortraitName() {
        return userPortraitName;
    }

    public void setUserPortraitName(String userPortraitName) {
        this.userPortraitName = userPortraitName;
    }

    public BaseUserDao getBaseUserDao() {
        return baseUserDao;
    }

    public void setBaseUserDao(BaseUserDao baseUserDao) {
        this.baseUserDao = baseUserDao;
    }

    public BaseUser getUser() {
        return user;
    }

    public void setUser(BaseUser user) {
        this.user = user;
    }

}
